"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MyCrypto_1 = require("../../MyCrypto");
var Insert = /** @class */ (function () {
    function Insert(props) {
        this._crypto = new MyCrypto_1.default();
        var knex = props.knex;
        this._knex = knex;
    }
    Insert.prototype.insert = function (TABLE_NAME, DATA) {
        var _DATA = this.encode(DATA);
        return this._knex(TABLE_NAME).insert(_DATA).catch(function (e) {
            throw e;
        });
    };
    Insert.prototype.encode = function (DATA) {
        return this._crypto.dataEncode(DATA);
    };
    return Insert;
}());
exports.default = Insert;
